﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FTradeCatheringEdit.aspx.cs" Inherits="IHISCETeim.Web.MachineSys.FTradeModel.FTradeCatheringEdit" %>

<%--修改收款记录--%>
<script type="text/javascript">
    $(document).ready(function () {
        $("div.FTradeCatheringEdit").find(".changeevent").blur(function () {
            settingFCTitle();
        })
        $("#FTradeCatheringEdit_KuanXiangLeiXing").change(function () {
            settingFCTitle();
            if ($(this).val() == "融资") {
                $("#FTradeCatheringEdit_MoneyFrom").show().val("<%=obj.MoneyFrom%>");
            } else {
                if ($(this).val() == "电汇") {
                    $("#FTradeCatheringAdd_MoneyFrom").show().val("<%=obj.MoneyFrom%>");
                } else {
                    $("#FTradeCatheringAdd_MoneyFrom").hide().val("");
                }
            }
            
        });
        if ("<%=obj.KuanXiangLeiXing%>" == "融资") {
            $("#FTradeCatheringEdit_MoneyFrom").show()
        } else {
            if ("<%=obj.KuanXiangLeiXing%>" == "电汇") {
                $("#FTradeCatheringEdit_MoneyFrom").show()
            } else {
                $("#FTradeCatheringEdit_MoneyFrom").hide()
            }
        }
      
        function settingFCTitle() {
            var $FCTitle = $(".FTradeCatheringEdit").find(":text[name='FCTitle']");
            var $JingXiaoShang = $(".FTradeCatheringEdit").find(":text[name='JingXiaoShang']").val();
            var $ShoukuanRiQi = $(".FTradeCatheringEdit").find(":text[name='ShoukuanRiQi']").val();
            var $JinE = $(".FTradeCatheringEdit").find(":text[name='JinE']").val();
            var $KuanXiangLeiXing = $(".FTradeCatheringEdit").find("select[name='KuanXiangLeiXing']").val();

            $FCTitle.val($ShoukuanRiQi + $JingXiaoShang + $JinE + $KuanXiangLeiXing);
        }

        // setInterval(settingFCTitle, 1000);
    })


</script>
<div class="pageContent">
	<form method="post" action="FTradeModel/FTradeCatheringEdit.aspx?ajaxmethod=edit&FCatheringId=<%=FCatheringId %>" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
		<div class="pageFormContent FTradeCatheringEdit" layoutH="58">             
				<label style=" font-weight:bold; color:Olive;">收款标题：</label>
				<input name="FCTitle" type="text" class="required" value="<%=obj.FCTitle %>" size="80"  />
                <span class="unit">(做为标签方便使用)</span>
			  
              <div class="divider"></div>
               <p>
				    <label>经 销 商：</label>
                    <input name="JingXiaoShang" type="text" value="<%=obj.JingXiaoShang %>" class="required textInput autocomplete changeevent" autocompletehref="<%=AutoCompleteRequestUrl %>?ajaxmethod=getagentlist" swidth="300" <%=obj.ShengYuJinE==obj.JinE?"":"readonly" %> />
			   </p>
               <p>
				    <label>收款日期：</label>
				    <input name="ShoukuanRiQi" class="date required changeevent" type="text" value="<%=obj.ShoukuanRiQi.ToString("yyyy-MM-dd") %>" alt=""/>
			   </p>
              <div class="divider"></div>
              <p>
				    <label>金     额：</label>
				    <input  name="JinE" class="required inputFloat changeevent" type="text" <%-- min="<%=obj.JinE-obj.ShengYuJinE %>"--%> value="<%=obj.JinE %>" readonly size="" alt="" />
                    <span class="unit">元</span>
			   </p>
               <p></p>
               <p>
                    <label>款项类型:</label>
                    <select id="FTradeCatheringEdit_KuanXiangLeiXing" name="KuanXiangLeiXing"　class="required changeevent"　>
                            <option value="" <%=obj.KuanXiangLeiXing==""?"selected":"" %>>请选择...</option>
                             <option value="样机押金" <%=obj.KuanXiangLeiXing=="样机押金"?"selected":"" %>>样机押金</option>
                              <option value="店招补助" <%=obj.KuanXiangLeiXing=="店招补助"?"selected":"" %>>店招补助</option>
                            <option value="电汇" <%=obj.KuanXiangLeiXing=="电汇"?"selected":"" %> >电汇</option>
                            <option value="汇票" <%=obj.KuanXiangLeiXing=="汇票"?"selected":"" %>>汇票</option>
                            <option value="融资" <%=obj.KuanXiangLeiXing=="融资"?"selected":"" %>>融资</option>
                            <option value="维修费" <%=obj.KuanXiangLeiXing=="维修费"?"selected":"" %>>维修费</option>
                            <option value="展会费" <%=obj.KuanXiangLeiXing=="展会费"?"selected":"" %>>展会费</option>
                            <option value="返利" <%=obj.KuanXiangLeiXing=="返利"?"selected":"" %>>返利</option>
                            <option value="其他" <%=obj.KuanXiangLeiXing=="其他"?"selected":"" %>>其他</option>
                            <option value="调帐" <%=obj.KuanXiangLeiXing=="调帐"?"selected":"" %>>调帐</option>
                     </select>
                      <input type="text" id="FTradeCatheringEdit_MoneyFrom" name="MoneyFrom" value="<%=obj.MoneyFrom%>" />
                </p>
                <div class="divider"></div>
               
                <label>备注：</label>
				<textarea name="Remark" cols="80" rows="4" ><%=obj.Remark %></textarea>
                <div style="clear:both;margin-bottom: 5px;"></div>
                <script>
                    $(document).ready(function () {
                        if ('<%=obj.State %>' == '不可用') {
                            alertMsg.error('对不起,此收款记录为系统生成,无法进行冲帐操作！');
                            $.pdialog.closeCurrent();
                            return;
                        }                       

                    })
                </script>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">修改</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>
	
</div>
